package com.lrs.java.j2se_self.collectionReview;
import java.util.*;
public class ViewSet {
	public static void main(String[] args){
		Collection c1 = new HashSet();
		Collection c2 = new HashSet();
		c1.add("a");c1.add("b");c1.add("c");
		c2.add("b");c2.add("a");c2.add("d");
		
		Set s1 = new HashSet(c1);
		s1.retainAll(c2);
		Set s2 = new HashSet(c2);
		s2.addAll(c1);
		System.out.println(s1);
		System.out.println(s2);
		
	}
}
